home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d16 / wc15_b.arc / RECOMP.WMS < prev    next >
Text File  |  1991-03-22  |  2KB  |  56 lines

  1. ;RECOMPILE all macro source files in the 'MACRO DIRECTORY' 
  2. STOP                            ; if we are not currently online go online
  3. CHGDIR(GETSESSSTR(28))          ; change to macro directory
  4. j = 0
  5. file$ = FILEFIND("*.wms",0)
  6. WHILE( (NULL(file$) ==0 ))
  7.     max = max+1
  8.     file$= FINDNEXT
  9. WEND
  10.    DIALOGBOX 87, 27, 173, 94, 21
  11.       CTEXT 7, 11, 160, 18, "Start from Beginning or Do You Want to Select the First File?"
  12.       PUSHBUTTON 28, 65, 115, 14, "I'll Select the First File"
  13.       PUSHBUTTON 28, 39, 115, 14, "Start From Beginning"
  14.    DEND
  15. DO which = DIALOG? until(which != 255)
  16.  
  17. sendspeckey(1,0,ASC("A"))       ; send key ALT+A
  18. sendspeckey(0,0,ASC("F"))       ; select files
  19. i = 0
  20. DO
  21.   sendspeckey(0,0,9)            ; send tab key
  22.   i = i+1
  23. UNTIL( i == 5)
  24.  
  25. window = GETFOCUS?        ; window = file listbox
  26. sendspeckey(0,0,36)             ; send Home key
  27.  
  28. If(which == 2){
  29.   sendspeckey(0,0,9)            ; send tab key to set focus elsewhere
  30.   DO UNTIL(window == GETFOCUS?)
  31. }
  32.  
  33.  
  34. next_file:
  35. sendspeckey(0,0,32)             ; send space key to select file
  36. i = 0
  37. DO i=i+1 UNTIL(i>100)        ; wait for window to respond
  38. sendspeckey(1,0,ASC("C"))       ; send ALT+C to compile
  39. DO i=i+1 UNTIL(i>100)        ; wait for compiler window to get focus
  40. win1=GETFOCUS?            ; win1 = Compile button
  41. DO 
  42.     i=GETFOCUS?
  43. UNTIL( (i!=win1) || (i==window) ) ; eventually focus will be at compiler window
  44. if(window!=GETFOCUS?){
  45.     HALT
  46. }
  47. j = j+1
  48. if(j == max){
  49.    sendspeckey(1,0,ASC("A"))    ; send ALT+a to cancel
  50.    HALT
  51. }
  52. sendspeckey(0,0,40)              ; send select next file aroow down
  53. goto next_file
  54.  
  55. END
  56.